package com.cems.mapper;/*
 *
 *@auth  wenzhao
 *@date 2021/5/17  19:52
 */

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cems.pojo.SysAdmin;
import com.cems.pojo.SysEntrust;
import com.cems.pojo.ComUser;
import com.cems.pojo.SysUser;
import com.cems.pojo.SysUserMessage;
import com.cems.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Mapper
@Component
public interface UserMapper extends BaseMapper<SysUser> {
    List<SysUser> getUser();

    void addUser(HashMap<String, String> map);

    int getUserIdByNum(String phone);

    void addUserInformation( @Param("adminIdByNum")  int adminIdByNum,
                             @Param("phone") String phone,
                             @Param("pwd")   String pwd,
                             @Param("emil")  String emil,
                             @Param("pname")  String pname
      );

    ComUser selOneUser(int useId);

    SysUser selOneSysUser(int id);

    int revOneUser(Map<String,Object> map);

    int revOneSysUser(Map<String,Object> map);

    List<SysUserMessage> getUserMessages();

    List<SysEntrust> getEntrust();

    void upUserStatus(@Param("id") int id,
                      @Param("status") String status);

    void upEtrustStatus(@Param("entrustId") int entrustId,
                        @Param("entState") String entState);

    SysUser selOneSysUserByPhone(String userPhone);
    void shensu(@Param("phone") String phone,@Param("content") String content);

    String findStatus(String phone);

    int zhaohuicheck(@Param("phone") String phone,@Param("email") String email);

    void zhaohuo(@Param("phone") String phone,@Param("newpwd1") String newpwd1);

    List<SysEntrust> byEntrustByType(Integer typeID);

    List<SysEcharts> selSysGraph(String adminType);


    int setSysLoginGraph(Map<String,Object> map);

    SysEcharts selOneSysSuc(int id);

    int insertSysSuc(int id);
}
